From: Marco Trevisan (TreviƱo) Date: Thu, 10 Sep 2026 17:15:30 +0000 (+0200) Subject: notificationDaemon: Avoid saving any notification if we've none X-Git-Tag: archive/raspbian/50.5-1+rpi1^2~6^2^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b443183c30f27dcb5f62826b71453fef92f70c65;p=gnome-shell.git notificationDaemon: Avoid saving any notification if we've none We used to save an empty variant, and load it for no reason, we can just avoid saving at all (and deleting if needed) Part-of: (cherry picked from commit ee95df839920b20ae4633d1bfd89a97384fbee2f) --- diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 9ea539c56..26df9655e 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -665,7 +665,9 @@ class GtkNotificationDaemon { } global.set_persistent_state(NOTIFICATION_SERIALIZED_NAME, - new GLib.Variant(NOTIFICATION_SERIALIZED_FORMAT, sources)); + sources.length + ? new GLib.Variant(NOTIFICATION_SERIALIZED_FORMAT, sources) + : null); } AddNotificationAsync(params, invocation) {